package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/1/12 15:47
 * @description
 */
public class Code520 {
    public boolean detectCapitalUse(String word) {
        String w = word.toLowerCase();
        if (word.equals(word.toUpperCase()) || word.equals(w) || w.substring(1).equals(word.substring(1))) {
            return true;
        }
        return false;
    }
}
